﻿/**
* ...
* @author Default
* @version 0.1
*/

package com.crlclr.utils {

	public class FileType {
		public static const SWF:String = "swf";
		public static const BITMAP:String = "Bitamp";
		public static const QXML:String = "qxml";
		
		public function FileType() {
			throw new Error("can't create instance");
		}
		public static function getType(path:String):String {
			if (path.lastIndexOf(".swf") > 0) {
				return SWF;
			}
			
			//下面这句也没有什么必要了,不过放着;
			if (path.lastIndexOf(".gif") > 0 || path.lastIndexOf(".jpg") > 0 || path.lastIndexOf(".png") || path.lastIndexOf("jpeg")) {
				return BITMAP;
			}
			return BITMAP;
		}
		
	}
	
}
